package com.wxproject.demo.Controller.Article;
import	java.security.Provider.Service;
import java.util.List;

import com.wxproject.demo.Common.lang.ResultBody;
import com.wxproject.demo.Service.ArticleTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zqf
 * @date 2021/4/11 15:40
 * @description
 */
/**
 获得所有分类
 根据分类查询文章
 */
@RestController
@RequestMapping("/article")
public class ArticleTypeController {
    @Autowired
    private ArticleTypeService articleTypeService;

    //获得所有分类
    @GetMapping("/getTypeList")
    public ResultBody getTypeList(){
        return ResultBody.ok().data("typeList",articleTypeService.getTypeList());
    }
}
